package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.YyDoctorScheduleMapper;
import com.ruoyi.system.domain.YyDoctorSchedule;
import com.ruoyi.system.service.IYyDoctorScheduleService;
import com.ruoyi.common.core.text.Convert;

/**
 * 医生排班Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-24
 */
@Service
public class YyDoctorScheduleServiceImpl implements IYyDoctorScheduleService 
{
    @Autowired
    private YyDoctorScheduleMapper yyDoctorScheduleMapper;

    /**
     * 查询医生排班
     * 
     * @param scheduleId 医生排班主键
     * @return 医生排班
     */
    @Override
    public YyDoctorSchedule selectYyDoctorScheduleByScheduleId(Long scheduleId)
    {
        return yyDoctorScheduleMapper.selectYyDoctorScheduleByScheduleId(scheduleId);
    }

    /**
     * 查询医生排班列表
     * 
     * @param yyDoctorSchedule 医生排班
     * @return 医生排班
     */
    @Override
    public List<YyDoctorSchedule> selectYyDoctorScheduleList(YyDoctorSchedule yyDoctorSchedule)
    {
        return yyDoctorScheduleMapper.selectYyDoctorScheduleList(yyDoctorSchedule);
    }

    /**
     * 新增医生排班
     * 
     * @param yyDoctorSchedule 医生排班
     * @return 结果
     */
    @Override
    public int insertYyDoctorSchedule(YyDoctorSchedule yyDoctorSchedule)
    {
        return yyDoctorScheduleMapper.insertYyDoctorSchedule(yyDoctorSchedule);
    }

    /**
     * 修改医生排班
     * 
     * @param yyDoctorSchedule 医生排班
     * @return 结果
     */
    @Override
    public int updateYyDoctorSchedule(YyDoctorSchedule yyDoctorSchedule)
    {
        return yyDoctorScheduleMapper.updateYyDoctorSchedule(yyDoctorSchedule);
    }

    /**
     * 批量删除医生排班
     * 
     * @param scheduleIds 需要删除的医生排班主键
     * @return 结果
     */
    @Override
    public int deleteYyDoctorScheduleByScheduleIds(String scheduleIds)
    {
        return yyDoctorScheduleMapper.deleteYyDoctorScheduleByScheduleIds(Convert.toStrArray(scheduleIds));
    }

    /**
     * 删除医生排班信息
     * 
     * @param scheduleId 医生排班主键
     * @return 结果
     */
    @Override
    public int deleteYyDoctorScheduleByScheduleId(Long scheduleId)
    {
        return yyDoctorScheduleMapper.deleteYyDoctorScheduleByScheduleId(scheduleId);
    }
}
